import routeComponentName from '@/config/route-component-name'

export default [
  {
    path: '/return/factory',
    component: () => import('@/layout/index.vue'),
    name: 'returnFactory',
    meta: {
      title: '返厂管理',
      icon: 'icon-fanchang',
    },
    redirect: '/return/factory/list',
    children: [
      {
        path: 'list',
        component: () => import('@/views/return-factory/repair/list/index.vue'),
        name: 'returnFactoryList',
        meta: {
          title: '返厂单列表',
          keepAlive: false,
          componentName: routeComponentName.returnFactory.returnFactoryList,
        },
        hidden: false,
      },
      {
        path: 'new',
        component: () => import('@/views/return-factory/repair/form/index.vue'),
        name: 'newReturnFactory',
        meta: {
          title: '新建返厂',
          keepAlive: true,
          componentName: routeComponentName.returnFactory.returnFactoryForm,
        },
        hidden: true,
      },
      {
        path: 'detail/:id',
        component: () => import('@/views/return-factory/repair/detail/index.vue'),
        name: 'returnFactoryDetail',
        meta: {
          title: '返厂详情',
          keepAlive: true,
          componentName: routeComponentName.returnFactory.returnFactoryDetail,
        },
        hidden: true,
      },
      {
        path: 'update',
        component: () => import('@/views/return-factory/repair/form/index.vue'),
        name: 'updateReturnFactory',
        meta: {
          title: '修改返厂',
          keepAlive: true,
          componentName: routeComponentName.returnFactory.returnFactoryForm,
        },
        hidden: true,
      },
      {
        path: 'detect/list',
        component: () => import('@/views/return-factory/detect/list/index.vue'),
        name: 'detectList',
        meta: {
          title: '检测单列表',
          keepAlive: false,
          componentName: routeComponentName.returnFactory.detectList,
        },
      },
      {
        path: 'detect/detail/:id',
        component: () => import('@/views/return-factory/detect/detail/index.vue'),
        name: 'detectDetail',
        meta: {
          title: '检测单详情',
          keepAlive: false,
          componentName: routeComponentName.returnFactory.detectDetail,
        },
        hidden: true,
      },
      {
        path: 'detect/create',
        component: () => import('@/views/return-factory/detect/form/index.vue'),
        name: 'detectCreate',
        meta: {
          title: '创建检测单',
          keepAlive: false,
          componentName: routeComponentName.returnFactory.detectCreate,
        },
        hidden: true,
      },
      {
        path: 'module/detail/:id',
        component: () => import('@/views/return-factory/module/Detail.vue'),
        name: 'returnFactoryModuleDetail',
        meta: {
          title: '返厂模块详情',
          keepAlive: true,
          componentName: routeComponentName.returnFactory.returnFactoryModuleDetail,
        },
        hidden: true,
      },
    ],
  },
]
